<script setup lang="ts">
const props = defineProps({
  windowHeight: {
    type: Number,
    defalut: 947,
  },
});
const zoomRatio = computed(() => {
  const wH = props.windowHeight || 947;
  return wH / 947;
});
</script>

<template>
  <div class="swiper-pages">
    <div class="content" :style="'transform: scale(' + zoomRatio + ');'">
      <div class="title">完善的开发者对接服务</div>
      <div class="code">
        <img class="code-img" src="/images/index/code.png" />
        <div class="code-content">
          <div class="co-s">
            <div class="code-title">开发者接入</div>
            <div class="code-desc">
              我司可为您提供完善的开发者对接服务，旨在为您打造无缝、高效的开发体验。无论是API集成还是SDK接入，我们的专业团队都将全程陪伴，提供详尽的技术文档和即时的技术支持。我们致力于简化开发流程，无忧地构建出卓越的支付解决方案。
            </div>
          </div>
          <div class="code-btn">
            <NuxtLink to="/developer">查看API文档</NuxtLink>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
@import "@/assets/scss/mixins.scss";

.swiper-pages {
  height: 100%;
  width: 100%;
  background-image: url("/images/index/banner3.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;

  .title {
    font-weight: 700;
    font-size: 34px;
    color: #ffffff;
    text-align: center;
    letter-spacing: 8px;
  }

  .code {
    margin-top: 68px;
    display: flex;
    .code-img {
      width: 610px;
    }
    .code-content {
      margin-left: 120px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .code-title {
        font-weight: 600;
        font-size: 26px;
        color: #5de2b4;
      }
      .code-desc {
        font-weight: 400;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        margin-top: 25px;
        line-height: 24px;
      }
      .code-btn {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 500;
        font-size: 20px;
        width: 300px;
        height: 76px;
        background: rgba(112, 118, 140, 0.5);
        border-radius: 0px 0px 0px 0px;
        border: 4px solid #ffffff;
        color: #ffffff;
        position: relative;
        transition: all 0.3s ease-in-out;
        a {
          font-weight: 500;
          color: #ffffff;
          font-size: 18px;
        }
        &:hover {
          background-color: rgba(255, 255, 255, 0.05);
          &::after {
            transform: translateX(10px);
          }
        }
        &::after {
          content: "";
          display: block;
          transition: transform 0.3s ease-in-out;
          position: absolute;
          right: -40px;
          width: 79px;
          height: 15px;
          background-image: url("/images/layouts/more-btn-arrow.png");
          background-repeat: no-repeat;
          background-size: 100% 100%;
          z-index: 1;
        }
      }
    }
  }
}
</style>
